﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;


//Author: ljj
//Date: 20190710
//Function: 可叠加buff的基类
public class RepeatableBuff : BaseBuff
{
    public override void Cover(float effect, float duration)
    {
        //Debug.Log("repeatable cover");
        if (isAwake)
            BuffDown();
        this.effect += effect;
        if (duration == -1)
            this.duration = -1;
        else
            this.duration = Mathf.Max(this.duration, duration);
        if (isAwake)
            BuffUp();
    }
}
